#include <iostream>
#include <iomanip>
using namespace std;
bool is_leapyear(int y)
{
    return !(y%4) and ((y%100) or !(y%400));
}

struct Date
{
    int day,month,year;
};
struct Month
{
    enum{Jan = 1, Feb, Mar, Apr, May, Jun,
         Jul, Aug, Sep, Oct, Nov, Dec
    };
    static int n_days(int m, int y){
        return m != Feb ? _days[m-1]:(is_leapyear(y) ? 29: 28);
    }
private:
    static int const _days[12];
    
};
const int Month::_days[12] = {31, 28, 31, 30, 31,30,31,31, 30, 31,30,31};

void add_year(Date& date)
{
    date.year += 1;
    if ( date.day > Month::n_days(date.month,date.year)){
        date.day = Month::n_days(date.month, date.year);
    }
}
void add_month(Date& date)
{
    date.month = date.month % 12 + 1;
    if( date.month == 1){
        add_year(date);
    }
    if ( date.day > Month::n_days(date.month,date.year)){
        date.day = Month::n_days(date.month, date.year);
    }
}    
void add_day(Date& date)
{
    date.day = (date.day)% Month::n_days(date.month,date.year) + 1;
    if(date.day == 1){
        add_month(date);
    }
}
ostream& operator << (ostream& os, const Date& date)
{
    os << setfill('0');
    return os << setw(4) << date.year << "/"
              << setw(2) << date.month << "/"
              << setw(2) << date.day << endl;

}
istream& operator >> (istream& is, Date& date)
{
    return is >> date.year >> date.month >> date.day;
}

    
int main()
{
    Date d;
    cin >> d;
    cout << d;
}
